var checkname="userid[]";

function addfilterUser(field,el) {
	var forma = document.getElementById("ulist_form");
	forma[field].value=el.value;	
	forma.op.value="";
	updateUser();
}
function updateRequestUser(id,action,f) {
	var forma = document.getElementById("ulist_form");
	forma.op.value=action;
	forma.id.value=id;
	if (f!=undefined) forma.newvalue.value = f.value;
	updateUser();
}

function deleteUser() {
	if (deleteconfirm()) { 
		updateRequestUser('','remove')
	}	
}

function updateUser() {
	showprogress();
	xajax_updateUser(xajax.getFormValues("ulist_form"));
}

function sendUserMessage(event) {
	if (countCheckedElements(checkname)>0) {
		openMessage(event,getCheckedElements(checkname),'utu');
	}
}

function showForm(e,usrId,fop,d,f,val) {
	var coordinates = getDivPosition(e); 
	var el = document.getElementById(d);
	el.style.left=coordinates.x;
    el.style.top=coordinates.y;

	var forma = document.getElementById("ulist_form");
    forma.op.value=fop;
    forma.id.value=usrId;
    forma[f].value=val;
	el.style.display='';   
 }